home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Grafik / Misc / ImageEnginer / ARexx / VignetteGrey.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1999-09-18  |  1.6 KB  |  60 lines

  1. /**************************************************/
  2. /* VignetteGrey V1.02                             */
  3. /* Image Engineer script                          */
  4. /* by Simon Edwards                               */
  5. /* Applies a blurred Vignette effect to an image. */
  6. /*                                                */
  7. /* MS: Alpha now uses zoomlevel of original image */
  8. /*                                                */
  9. /**************************************************/
  10.  
  11. Options results
  12. signal on error            /* Setup a place for errors to go */
  13.  
  14. if arg()==0 then exit
  15.  
  16. PROJECT_INFO arg(1) Type
  17. if result='GREY' then exit
  18.  
  19. CONVERT_TO_GREY arg(1)
  20. greyimage=result
  21. PROJECT_INFO arg(1) Width
  22. width=result
  23. PROJECT_INFO arg(1) Height
  24. height=result
  25. PROJECT_INFO arg(1) Zoom
  26. zoomlevel=result
  27.  
  28. 'OPEN IE:alpha/Spherical.alpha 8bit'
  29. alphachannel=result
  30.  
  31. PROJECT_SET alphachannel ZOOM zoomlevel
  32.  
  33. 'MARK' arg(1) 'PRIMARY'
  34. 'MARK' greyimage 'SECONDARY'
  35. 'MARK' alphachannel 'ALPHA'
  36. 'COMPOSITE 0 0 ALPHA STRETCH'
  37.  
  38. CLOSE alphachannel
  39. CLOSE greyimage
  40.  
  41. exit
  42.  
  43. /*******************************************************************/
  44. /* This is where control goes when an error code is returned by IE */
  45. /* It puts up a message saying what happened and on which line     */
  46. /*******************************************************************/
  47. error:
  48. if RC=5 then do            /* Did the user just cancel us? */
  49.     IE_TO_FRONT
  50.     LAST_ERROR
  51.     'REQUEST "'||RESULT||'"'
  52.     exit
  53. end
  54. else do
  55.     IE_TO_FRONT
  56.     LAST_ERROR
  57.     'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!'
  58.     exit
  59. end
  60.